#coding=utf8
import itchat
'''
    这个还没有怎么测试，接收是能接收到，实现简单接收微信信息以及简单回复操作
    登录微信需要手机扫描itchat运行后生成的二维码
'''


@itchat.msg_register('Text')
def text_reply(msg):
    message = msg['Text']
    print(message)
    reply = u'忙碌中哦'
    if u'在吗' or '?' in message:
        reply = u'在的呀，有什么事吗？'
    elif u'早' in message:
        reply = u'早呀，早起的鸟儿有虫吃'
    elif u'青' in message:
        reply = u'找我家主人什么事？'
    elif u'牛' in message:
        reply = u'辣鸡'
    elif u'你好' in message:
        reply = u'你好'
    elif u'亲爱的' in message:
        reply = u'亲爱的~来，给我波儿一个，嘻嘻！！！'
    return reply

itchat.auto_login(hotReload=True)
itchat.run()

